Openvswitch 2.13 and python3
Hi guys,
I am integrating ovs/dpdk on Yocto Zeus.
As I am using a custom Linux Kernel 4.19, I can't use ovs 2.11 and used the mainline version.
FYI I struggled with EXTRA_OECONF to point to my Linux Kernel as mentionned in [ http://git.yoctoproject.org/cgit/cgit.cgi/meta-virtualization/tree/recipes-networking/openvswitch/openvswitch.inc?h=master#n45 | Openvswitch recipe ] . EXTRA_OECONF_append_pn-openvswitch needs to be used in distro instead of EXTRA_OECONF_pn-openvswitch +=
Now my ovs/dpdk is correctly installed on my Yocto image.
However, ovs utilities seem to have wrong shebang (#! python3). The shebang is based on PYTHON3 variable. For instance: [ https://github.com/openvswitch/ovs/blob/master/utilities/ovs-test.in#L1 | https://github.com/openvswitch/ovs/blob/master/utilities/ovs-test.in#L1 ] PYTHON3 variable is provided in EXTRA_OECONF from openvswitch.inc:
EXTRA_OECONF += "\
PYTHON=python3 \
PYTHON3=python3 \
PERL=${bindir}/perl \
" Did you encounter this issue ?
Also, OVS utilities - including test tools - still use python2 syntax but Openvswitch recipe RDEPEND on python3 only. I don't know if it is a known issue. I know that some recent work on python3 migration was done by ovs team but AFAIK, utilities scripts would require some work.
I will give a try to migrate those scripts with [ https://docs.python.org/3.8/library/2to3.html | 2to3 ] tool.
Please do not hesitate to contact me if you need some clarification.
BR,
Eloi
Quoted 20 lines · Éloi Bail
Hi guys,
I am integrating ovs/dpdk on Yocto Zeus.
As I am using a custom Linux Kernel 4.19, I can't use ovs 2.11 and used the mainline version.FYI I struggled with
EXTRA_OECONFto point to my Linux Kernel as mentionned in Openvswitch recipe. EXTRA_OECONF_append_pn-openvswitch needs to be used in distro instead of EXTRA_OECONF_pn-openvswitch +=Now my ovs/dpdk is correctly installed on my Yocto image.
However, ovs utilities seem to have wrong shebang (#! python3). The shebang is based on PYTHON3 variable. For instance: https://github.com/openvswitch/ovs/blob/master/utilities/ovs-test.in#L1
PYTHON3 variable is provided inEXTRA_OECONFfrom openvswitch.inc:
EXTRA_OECONF+= "\
PYTHON=python3 \
PYTHON3=python3 \
PERL=${bindir}/perl \
"
Quoted 5 lines
Did you encounter this issue ?
Also, OVS utilities - including test tools - still use python2 syntax but Openvswitch recipe RDEPEND on python3 only. I don't know if it is a known issue. I know that some recent work on python3 migration was done by ovs team but AFAIK, utilities scripts would require some work.
I will give a try to migrate those scripts with 2to3 tool.
We switched to use Python3 exclusively with OVS for quite a while now. With the Yocto Project being mostly used in embedded environments size was the driving factor, having py2 and py3 present was not desirable. With Python2 being EOL'd at this point I suspect the upstream OVS community will soon remove any traces of python2 from the project. There is no value in spending any time on py2 with OVS at this point. The package will build and operate just fine as it is.
Mark
Quoted 10 lines
Please do not hesitate to contact me if you need some clarification.
BR,
Eloi
Quoted 44 lines
Quoted 24 lines · Éloi Bail
Hi guys,
I am integrating ovs/dpdk on Yocto Zeus.
As I am using a custom Linux Kernel 4.19, I can't use ovs 2.11 and used the mainline version.FYI I struggled with
EXTRA_OECONFto point to my Linux Kernel as mentionned in Openvswitch recipe.
EXTRA_OECONF_append_pn-openvswitch needs to be used in distro instead of EXTRA_OECONF_pn-openvswitch +=Now my ovs/dpdk is correctly installed on my Yocto image.
However, ovs utilities seem to have wrong shebang (#! python3). The shebang is based on PYTHON3 variable. For instance:
https://github.com/openvswitch/ovs/blob/master/utilities/ovs-test.in#L1
PYTHON3 variable is provided inEXTRA_OECONFfrom openvswitch.inc:
EXTRA_OECONF+= "\
PYTHON=python3 \
PYTHON3=python3 \
PERL=${bindir}/perl \
"Quoted 8 lines
Did you encounter this issue ?
Also, OVS utilities - including test tools - still use python2 syntax but Openvswitch recipe RDEPEND on python3 only. I don't know if it is a known issue.
I know that some recent work on python3 migration was done by ovs team but AFAIK, utilities scripts would require some work.
I will give a try to migrate those scripts with 2to3 tool.We switched to use Python3 exclusively with OVS for quite a while now. With the Yocto Project being mostly used in embedded environments size was the driving factor, having py2 and py3 present was not desirable. With Python2 being EOL'd at this point I suspect the upstream OVS community will soon remove any traces of python2 from the project. There is no value in spending any time on py2 with OVS at this point. The package will build and operate just fine as it is.
Quoted 1 line
Mark
Hi Mark,
I can't disagree with that. Python2 must be dropped ! The work needs to be done on OVS side. I was just wondering if you were aware of the limitations regarding the usage of python2 OVS test tools and if you had any feedback from OVS team.
However, I believe that the shebang issue (set to #! python3) should be resolved in meta-virtualization. Did you also see this issue ?
Eloi
Quoted 59 lines · On Wednesday, April 15, 2020 2:45:57 A.M. EDT Éloi Bail wrote:
Quoted 55 lines
On Tue, Apr 7, 2020 at 10:57 AM Éloi Bail
Quoted 36 lines · <[email protected]> wrote:
Hi guys,
I am integrating ovs/dpdk on Yocto Zeus.
As I am using a custom Linux Kernel 4.19, I can't use ovs 2.11 and used the
mainline version.
FYI I struggled with
EXTRA_OECONFto point to my Linux Kernel as mentionned in>>
Openvswitch recipe.EXTRA_OECONF_append_pn-openvswitch needs to be used in distro instead of
EXTRA_OECONF_pn-openvswitch +=
Now my ovs/dpdk is correctly installed on my Yocto image.
However, ovs utilities seem to have wrong shebang (#! python3). The shebang is>>
based on PYTHON3 variable. For instance:
https://github.com/openvswitch/ovs/blob/master/utilities/ovs-test.in#L1
PYTHON3 variable is provided inEXTRA_OECONFfrom openvswitch.inc:
EXTRA_OECONF+= "\
PYTHON=python3 \
PYTHON3=python3 \
PERL=${bindir}/perl \
"Did you encounter this issue ?
Also, OVS utilities - including test tools - still use python2 syntax but Openvswitch recipe RDEPEND on python3 only. I don't know if it is a known
Quoted 7 lines
issue.
I know that some recent work on python3 migration was done by ovs team but
AFAIK, utilities scripts would require some work. I will give a try to migrate those scripts with 2to3 tool.
We switched to use Python3 exclusively with OVS for quite a while now. With the Yocto Project being mostly used in embedded environments size was the driving factor, having py2 and py3 present was not desirable. With Python2 being EOL'd at this point I suspect the upstream OVS community will soon remove any traces of python2 from the project. There is no value in spending any time on py2 with OVS at this point. The package will build and operate just fine as it is.
Quoted 1 line
Mark
Hi Mark,
Quoted 7 lines
I can't disagree with that. Python2 must be dropped ! The work needs to be done on OVS side. I was just wondering if you were aware of the limitations regarding the usage of python2 OVS test tools and if you had any feedback from OVS team.
However, I believe that the shebang issue (set to #! python3) should be resolved in meta-virtualization. Did you also see this issue ?
We use OVS extensively, for example as a VRF in meta-overc, and throughout many telco type deployments, but by no means do we make use of every tool or part of the project. We have run into no issues or failures, outside of ignoring the py2 test results. When we did first make the switch to py3 we did send some changes upstream and they were receptive to moving to py3 as default, even well before py2 EOL was even being discussed.
If you did run into issues I would suggest you try to upstream them or send them to the list. If they are reasonable I am sure Bruce would have no issue hosting them on meta-virtualization.
Mark
Quoted 2 lines
Eloi